﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using FXnaWpfBase;

using GWApplication;

namespace GWPresentation
{
    public class TvLayerVM:MDTVIViewModel
    {

        public TvLayerVM(MDTVIViewModel parent,TLayer layer)
            : base(parent)
        {

            this._layer = layer;
 

        }


        TLayer _layer;

        public TLayer Layer
        {
            get { return _layer; }
           
        }


        public override string Desc
        {

            get
            {
                return this._layer.Desc;
            }

        }



        public override System.Windows.Input.ICommand DoubleClickCommand
        {
            get
            {
                return base.DoubleClickCommand;
            }
        }


        protected override void OnSelectedChanged()
        {
            base.OnSelectedChanged();

            if (this.IsSelected)
            {
                GisService.CurrentService.SetSelectedLayer(this._layer.Id);
                
            }


        }


        protected override void OnCheckedChanged()
        {


            base.OnCheckedChanged();



        }



    }
}
